﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>通过按钮打开新窗口</title>
    <script>
        function openWin() {
            window.open("http://www.baidu.com");
        }
    </script>
</head>
<body>
    <input type="button" value="打开窗口" onclick="openWin()" />
</body>
</html>